import React, {useState, Fragment} from 'react';

let showSex = true
export default function Example() {
    const [age, setAge] = useState(18)
    const [sex, setSex] = useState('男')
    // if (showSex) {
    //     const [sex, setSex] = useState('男')
    //     showSex = false
    // }
    const [work, setWork] = useState('前端程序员')
    return (
        <Fragment>
            <p>JSPang 今年:{age}岁</p>
            <p>性别:{sex}</p>
            <p>工作是:{work}</p>
        </Fragment>
    )
}

